
#import <UIKit/UIKit.h>



enum
{
	STORAGE_ACCESS_DIR_CACHES		= 0,	
	STORAGE_ACCESS_DIR_DOCUMENTS,			
	STORAGE_ACCESS_DIR_TMP,					
};
typedef NSUInteger StorageDirType;




@interface CacheController : NSObject
{
	StorageDirType	m_CurrentDirType;
	NSArray*		m_DirPathTbl;		
}
@property(nonatomic) StorageDirType		m_CurrentDirType;


- (NSString*)getAccessPath;


- (BOOL)save:(NSData*)data path:(NSString*)path;
- (BOOL)saveArray:(NSArray*)data path:(NSString*)path;
- (BOOL)saveDictionary:(NSDictionary*)data path:(NSString*)path;
- (NSData*)load:(NSString*)path;
- (NSArray*)loadArray:(NSString*)path;
- (NSDictionary*)loadDictionary:(NSString*)path;
- (BOOL)isExist:(NSString*)path;

- (BOOL)createDirectory:(NSString*)path;

- (unsigned long long)getDirectorySize:(NSString*)path;

- (BOOL)move:(NSString*)src_path toPath:(NSString*)dst_path;
- (BOOL)copy:(NSString*)src_path toPath:(NSString*)dst_path;

- (BOOL)remove:(NSString*)path;
- (void)removeAll;


- (unsigned long long)getFileSize:(NSString*)path;

- (NSString *)getFileModifyDateString:(NSString*)path;

- (NSArray*)getDirectories:(NSString*)path;
- (NSDate*)getFileModifyDate:(NSString*)path;

@end